<!DOCTYPE html>
<html lang="en">
<head>
<title>SChannel helper: SChannel.Utils: Class ESSPIError</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<div class="container"><div class="navigation">
<h2><a href="index.html">SChannel helper</a></h2><ul><li><a href="AllUnits.html">Units</a></li><li><a href="ClassHierarchy.html">Class Hierarchy</a></li><li><a href="AllClasses.html">Classes, Interfaces, Objects and Records</a></li><li><a href="AllTypes.html">Types</a></li><li><a href="AllVariables.html">Variables</a></li><li><a href="AllConstants.html">Constants</a></li><li><a href="AllFunctions.html">Functions and Procedures</a></li><li><a href="AllIdentifiers.html">Identifiers</a></li></ul></div><div class="content">
<span id="ESSPIError"></span><h1 class="cio">Class ESSPIError</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section"><a class="section" href="#PasDoc-Fields">Fields</a></div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="SChannel.Utils.html">SChannel.Utils</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ESSPIError = class(Exception)</code></p>
<h2 class="description">Description</h2>
<p>
Specific exception class. Could be created on WinAPI error, SChannel error or general internal error. </p>

<ul class="paragraph_spacing">
  <li><p>WinAPI errors are used when a SChannel function returns result code via <code>GetLastError</code>. Non-zero <code><a class="normal" href="SChannel.Utils.ESSPIError.html#WinAPIErr">WinAPIErr</a></code> field is set then.</p></li>
  <li><p>SChannel errors are used when a SChannel function returns status code of type <code>SECURITY_STATUS</code> OR it succeedes but something went wrong. Non-zero <code><a class="normal" href="SChannel.Utils.ESSPIError.html#SecStatus">SecStatus</a></code> field is set then.</p></li>
  <li><p>General errors are used in other cases, like incorrect arguments.</p></li>
</ul>

<p></p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="ancestor">Exception</li>
<li class="thisitem">ESSPIError</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Fields"></span><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="SChannel.Utils.ESSPIError.html#WinAPIErr">WinAPIErr</a></strong>: DWORD;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="SChannel.Utils.ESSPIError.html#SecStatus">SecStatus</a></strong>: SECURITY_STATUS;</code></td>
</tr>
</table>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="SChannel.Utils.ESSPIError.html#CreateWinAPI">CreateWinAPI</a></strong>(const Action, Func: string; Err: DWORD);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="SChannel.Utils.ESSPIError.html#CreateSecStatus">CreateSecStatus</a></strong>(const Action, Func: string; Status: SECURITY_STATUS; const Info: string = ''); overload;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="WinAPIErr"></span><code><strong>WinAPIErr</strong>: DWORD;</code></td>
</tr>
<tr><td colspan="2">
<p>
If not zero, reason of exception is WinAPI and this field contains code of an error returned by GetLastError</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="SecStatus"></span><code><strong>SecStatus</strong>: SECURITY_STATUS;</code></td>
</tr>
<tr><td colspan="2">
<p>
If not zero, reason of exception is SChannel and this field contains security status returned by last function call</p>
</td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="CreateWinAPI"></span><code>constructor <strong>CreateWinAPI</strong>(const Action, Func: string; Err: DWORD);</code></td>
</tr>
<tr><td colspan="2">
<p>
Create WinAPI exception based on Err code   </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>Action</dt>
<dd>- current action, like <code>sending data</code> or <code>@ Init</code></dd>
<dt>Func</dt>
<dd>- WinAPI method, like <code>Send</code></dd>
<dt>Err</dt>
<dd>- error code</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="CreateSecStatus"></span><code>constructor <strong>CreateSecStatus</strong>(const Action, Func: string; Status: SECURITY_STATUS; const Info: string = ''); overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Create SChannel exception based on status and, optionally, on custom info message     If empty, info message is generated based on Status</p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>Action</dt>
<dd>- current action, like <code>@ <a class="normal" href="SChannel.Utils.html#CreateCredentials">CreateCredentials</a></code></dd>
<dt>Func</dt>
<dd>- SChannel method, like <code>AcquireCredentialsHandle</code></dd>
<dt>Status</dt>
<dd>- SChannel status that will be copied to <a class="normal" href="SChannel.Utils.ESSPIError.html#SecStatus">SecStatus</a> field.</dd>
<dt>Info</dt>
<dd>- custom info message that will be inserted in exception message.</dd>
</dl>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0</a>. </em>
</span>
</div></div></body></html>
